package com.ruoyi.qif.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.qif.mapper.QifStatisticsMapper;
import com.ruoyi.qif.domain.QifStatistics;
import com.ruoyi.qif.service.IQifStatisticsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 锜风公寓-营业统计Service业务层处理
 * 
 * @author David
 * @date 2025-11-03
 */
@Service
public class QifStatisticsServiceImpl implements IQifStatisticsService 
{
    @Autowired
    private QifStatisticsMapper qifStatisticsMapper;

    /**
     * 查询锜风公寓-营业统计
     * 
     * @param statisticsId 锜风公寓-营业统计主键
     * @return 锜风公寓-营业统计
     */
    @Override
    public QifStatistics selectQifStatisticsByStatisticsId(Long statisticsId)
    {
        return qifStatisticsMapper.selectQifStatisticsByStatisticsId(statisticsId);
    }

    /**
     * 查询锜风公寓-营业统计列表
     * 
     * @param qifStatistics 锜风公寓-营业统计
     * @return 锜风公寓-营业统计
     */
    @Override
    public List<QifStatistics> selectQifStatisticsList(QifStatistics qifStatistics)
    {
        return qifStatisticsMapper.selectQifStatisticsList(qifStatistics);
    }

    /**
     * 新增锜风公寓-营业统计
     * 
     * @param qifStatistics 锜风公寓-营业统计
     * @return 结果
     */
    @Override
    public int insertQifStatistics(QifStatistics qifStatistics)
    {
        qifStatistics.setCreateTime(DateUtils.getNowDate());
        return qifStatisticsMapper.insertQifStatistics(qifStatistics);
    }

    /**
     * 修改锜风公寓-营业统计
     * 
     * @param qifStatistics 锜风公寓-营业统计
     * @return 结果
     */
    @Override
    public int updateQifStatistics(QifStatistics qifStatistics)
    {
        qifStatistics.setUpdateTime(DateUtils.getNowDate());
        return qifStatisticsMapper.updateQifStatistics(qifStatistics);
    }

    /**
     * 批量删除锜风公寓-营业统计
     * 
     * @param statisticsIds 需要删除的锜风公寓-营业统计主键
     * @return 结果
     */
    @Override
    public int deleteQifStatisticsByStatisticsIds(String statisticsIds)
    {
        return qifStatisticsMapper.deleteQifStatisticsByStatisticsIds(Convert.toStrArray(statisticsIds));
    }

    /**
     * 删除锜风公寓-营业统计信息
     * 
     * @param statisticsId 锜风公寓-营业统计主键
     * @return 结果
     */
    @Override
    public int deleteQifStatisticsByStatisticsId(Long statisticsId)
    {
        return qifStatisticsMapper.deleteQifStatisticsByStatisticsId(statisticsId);
    }
}
